#include<stdio.h>
int isPrime(int x,int knowPrime[],int numberOfKnowPrime);
int main(){
	const int number = 10;
	int Prime[10] = {2};
	int i = 3;
	int count = 1;
	{int i;
	printf("\t\t");
	for(i=0;i<number;i++){
		printf("%d\t",i);
	}
	printf("\n");
	}
	while(count<number){
		if(isPrime(i,Prime,count)){
			Prime[count++]=i;
		}	
		{
		printf("i=%d\tcnt=%d\t",i,count);
			int i;
		for(i=0;i<number;i++){
			printf("%d\t",Prime[i]);
		}
		printf("\n");
		}
		i++;
	}
	for(i=0;i<number;i++){
		printf("%d",Prime[i]);
		if((i+1)%5)printf("\t");
		else printf("\n");
	}
	return 0;
} 
int isPrime(int x,int knowPrime[],int numberOfKnowPrime){
	int i;
	int ret = 1;
	for(i=0;i<numberOfKnowPrime;i++){
		if(x%knowPrime[i]==0){
			ret = 0;
			break;
		}
	}
}
